home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr05 / ew120.zip / FILES1.ZIP / EWUSER.INC < prev    next >
Text File  |  1993-05-02  |  10KB  |  302 lines

  1. {-EW API - Useful constants and types used in Extension DLLs}
  2.  
  3. const
  4.  
  5. {-Command codes used to identify EW functions within hooks}
  6.  
  7. ew_MFOpen            =  201;
  8. ew_MFNew             =  202;
  9. ew_MFClone           =  203;
  10. ew_MFGet             =  204;
  11. ew_MFWrite           =  205;
  12. ew_MFAppend          =  206;
  13. ew_MFSave            =  207;
  14. ew_MFSaveAs          =  208;
  15. ew_MFRefresh         =  209;
  16. ew_MFGrep            =  210;
  17. ew_MFAssociate       =  211;
  18. ew_MFCC              =  215;
  19. ew_MFPrint           =  217;
  20. ew_MFPrintSetup      =  218;
  21. ew_MFPageSetup       =  219;
  22. ew_MFExit            =  221;
  23. ew_MFExitEditor      =  222;
  24.  
  25. ew_MEUndo            =  301;
  26. ew_MEClearUndo       =  302;
  27. ew_MECut             =  304;
  28. ew_MECutAppend       =  305;
  29. ew_MECopy            =  306;
  30. ew_MECopyAppend      =  307;
  31. ew_MEPasteIns        =  308;
  32. ew_MEPasteOvr        =  309;
  33. ew_MEClear           =  311;
  34. ew_MESelectAll       =  312;
  35. ew_MEDelete          =  314;
  36. ew_MEDraw            =  316;
  37. ew_MERecordMac       =  318;
  38. ew_MELoadMac         =  319;
  39. ew_MESaveMac         =  320;
  40. ew_MEReplayMac       =  321;
  41. ew_MEReplayMacN      =  322;
  42. ew_MEAsciiMode       =  323;
  43.  
  44. ew_MBSet             =  401;
  45. ew_MBGotoMark1       =  403;
  46. ew_MBGotoMark2       =  404;
  47. ew_MBGotoMark3       =  405;
  48. ew_MBRemoveMark1     =  407;
  49. ew_MBRemoveMark2     =  408;
  50. ew_MBRemoveMark3     =  409;
  51. ew_MBGoto            =  411;
  52. ew_MBGotoSel         =  412;
  53. ew_MBCompare         =  414;
  54.  
  55. ew_MSFind            =  501;
  56. ew_MSRepeatFind      =  502;
  57. ew_MSFindWord        =  503;
  58.  
  59. ew_MCCompile         =  601;
  60. ew_MCMake            =  602;
  61. ew_MCRebuild         =  603;
  62. ew_MCDebug           =  604;
  63. ew_MCExecute         =  605;
  64. ew_MCNext            =  607;
  65. ew_MCPrevious        =  608;
  66. ew_MCCommands        =  610;
  67.  
  68. ew_MLSet             =  701;
  69. ew_MLSaveCnf         =  702;
  70. ew_MLLoadCnf         =  703;
  71. ew_MLAssign          =  705;
  72. ew_MLExpansion       =  707;
  73.  
  74. ew_MWRibbon          =  801;
  75. ew_MWHide            =  803;
  76. ew_MWTile            =  805;
  77. ew_MWCascade         =  806;
  78. ew_MWHideAll         =  807;
  79. ew_MWIconizeAll      =  808;
  80. ew_MWScrolling       =  810;
  81. ew_MWFont            =  812;
  82.  
  83. ew_MULoadExt         =  901;
  84. ew_MUUnloadExt       =  902;
  85. ew_MUExecuteExt      =  903;
  86. ew_MUAutoLoad        =  904;
  87. ew_DefineMenu        =  906;
  88.  
  89. ew_AddTab            = 9001;
  90. ew_BlockShift        = 9010;
  91. ew_BeginLine         = 9011;
  92. ew_CasePrimUpper     = 9012;
  93. ew_CasePrimLower     = 9013;
  94. ew_CheckBrace        = 9014;
  95. ew_ClearLine         = 9015;
  96. ew_DeleteCurLine     = 9016;
  97. ew_DeleteEOL         = 9017;
  98. ew_DeleteLeftChar    = 9018;
  99. ew_DeleteWord        = 9019;
  100. ew_EndLine           = 9020;
  101. ew_Enter             = 9021;
  102. ew_GoNextPar         = 9022;
  103. ew_GoNextTab         = 9023;
  104. ew_GoPrevPar         = 9024;
  105. ew_GoPrevTab         = 9025;
  106. ew_InputPause        = 9026;
  107. ew_InsertBrace       = 9027;
  108. ew_InsertDate        = 9028;
  109. ew_InsertFilename    = 9029;
  110. ew_InsertTime        = 9030;
  111. ew_JoinLine          = 9031;
  112. ew_LoadUserFile      = 9032;
  113. ew_NextCol           = 9041;
  114. ew_NextLine          = 9042;
  115. ew_NextWord          = 9043;
  116. ew_PageBottom        = 9044;
  117. ew_PageTop           = 9045;
  118. ew_PageScrollHLeft   = 9046;
  119. ew_PageScrollHRight  = 9047;
  120. ew_PageScrollVDown   = 9048;
  121. ew_PageScrollVUp     = 9049;
  122. ew_PrevCol           = 9050;
  123. ew_PrevLine          = 9051;
  124. ew_PrevWord          = 9052;
  125. ew_Reflow            = 9054;
  126. ew_RemoveTab         = 9055;
  127. ew_SetCurLine2Bottom = 9056;
  128. ew_SetCurLine2Middle = 9057;
  129. ew_SetCurLine2Top    = 9058;
  130. ew_ShiftTextRight    = 9059;
  131. ew_SplitLine         = 9072;
  132. ew_StepScrollDown    = 9073;
  133. ew_StepScrollLeft    = 9074;
  134. ew_StepScrollRight   = 9075;
  135. ew_StepScrollUp      = 9076;
  136. ew_StripFlow         = 9077;
  137. ew_SumBlock          = 9078;
  138. ew_TextBoundBegin    = 9079;
  139. ew_TextBoundEnd      = 9080;
  140. ew_TextToCursor      = 9081;
  141. ew_ToggleIns         = 9082;
  142. ew_UpcaseFirst       = 9083;
  143. ew_UserBlockSort     = 9084;
  144. ew_UserFillBlock     = 9085;
  145.  
  146. {-Value that should be returned by EWExecute or by a hook if the extension  }
  147. { failed. Otherwise return 0 or leave the original EW return code unchanged.}
  148.  
  149. ewerr_EXTFAILED = 300;
  150.  
  151. {-Values returned by EWCallUserExt if the extension could not be executed}
  152.  
  153. ewerr_NOSUCHEXTENSION = 301;
  154. ewerr_NOEXECEXPORTED  = 302;
  155.  
  156. {-Values that may be returned after execution of an editing function}
  157.  
  158. ewerr_CANTMOVE         = 351;  { The cursor could not be moved as requested }
  159. ewerr_CANTPROCEED      = 352;  { The function could not be executed }
  160.  
  161. {-Values passed by EWSetHook and EWRemoveHook to EW}
  162.  
  163. EWHook_FunctionEntry    = 0;
  164. EWHook_FunctionExit     = 1;
  165. EWHook_KeyboardEntry    = 2;
  166. EWHook_PaintEntry       = 3;
  167. EWHook_LoadExit         = 4;
  168. EWHook_Notify           = 5;
  169.  
  170. {-Values passed by EW to the callback notification hook to identify the event}
  171.  
  172. EWNotify_ExitEditor     = 0;
  173. EWNotify_CreateClone    = 1;
  174. EWNotify_DestroyClone   = 2;
  175. EWNotify_FileAutosaved  = 3;
  176. EWNotify_FontChanged    = 4;
  177. EWNotify_PosChanged     = 5;
  178. EWNotify_ActWinChanged  = 6;
  179. EWNotify_CharEntry      = 7;
  180. EWNotify_CharExit       = 8;
  181.  
  182. {-Possible assignment modes when using EWAddMenuEntry}
  183.  
  184. EWMNU_Program   = 0;
  185. EWMNU_Command   = 1;
  186. EWMNU_Macro     = 2;
  187. EWMNU_Extension = 3;
  188.  
  189. {-Global Flags constants}
  190.  
  191.   EWGlbShow              =  1;     { Show edit window when created }
  192.   EWGlbShowWild          =  2;     { Show windows created with wildcards }
  193.   EWGlbMinCC             =  3;     { Iconize CC after creating window }
  194.   EWGlbReShowCC          =  4;     { Reshow CC after edit window creation }
  195.   EWGlbDispShortCuts     =  5;     { Display shortcuts in menus }
  196.   EWGlbReplaceSel        =  6;     { Typing replace Selection }
  197.   EWGlbAddOnLast         =  7;     { Insert with  on last line }
  198.   EWGlbFormatFrom        =  8;     { Format from current line only }
  199.   EWGlbExpansion         =  9;     { Syntax Expansion enabled }
  200.   EWGlbAutoMacros        = 10;     { Auto Macros enabled }
  201.   EWGlbEnterClassic      = 11;     { Split line with Enter }
  202.   EWGlbInsert            = 12;     { Insert on by default }
  203.   EWGlbAutoScroll        = 13;     { Use autoscroll mode }
  204.   EWGlbAlarm             = 14;     { Beep on error }
  205.   EWGlbLog               = 15;     { Maintain session logging }
  206.   EWGlbBak               = 16;     { Create .BAK flags }
  207.   EWGlbWarning           = 17;     { Warning before file overwrite }
  208.   EWGlbLoadList          = 18;     { @xxxx.xxx files are lists }
  209.   EWGlbAutosaveOpt       = 19;     { Autosave options }
  210.   EWGlbAutosave          = 20;     { Autosave files }
  211.   EWGlbDeleteOut         = 21;     { Suppress .ERR file }
  212.   EWGlbGrepRegular       = 22;     { Grep uses Boolean Search }
  213.   EWGlbGrepAnsi          = 23;     { Grep uses Ansi charset }
  214.   EWGlbGrepCase          = 24;     { Grep makes a case sensitive search }
  215.   EWGlbGrepSubDir        = 25;     { Grep searches in subdirectories }
  216.   EWGlbJump              = 26;     { Jump on Home/End }
  217.   EWGlbHasScrollbars     = 27;     { Edit Windows have Scrollbars }
  218.   EWGlbHasRibbon         = 28;     { Edit Windows have a Ribbon }
  219.   EWGlbRepaint           = 29;     { Scroll method }
  220.   EWGlbStripJoin         = 30;     { Strip Spaces when joining Lines }
  221.  
  222. {-Local Flags constants}
  223.  
  224.   EWLclbBlank       =  1;          { Strip trailing blanks }
  225.   EWLclbAutoBack    =  2;          { Backspace behaviour }
  226.   EWLclbAutoTab     =  4;          { Autotab flag }
  227.   EWLclbAutoInsert  =  5;          { AutoInsert braces }
  228.   EWLclbAutoComp    =  6;          { AutoCompress tabs }
  229.   EWLclbWordWrap    =  7;          { Wordwrap }
  230.   EWLclbJustify     =  8;          { Right justification }
  231.   EWLclbLoadAscii   =  9;          { Loaded file supposed to be Ascii file }
  232.   EWLclbSaveAscii   = 10;          { Save file in Ascii format }
  233.   EWLclbEOF         = 11;          { Add a Ctrl Z at the end of the file }
  234.   EWLclbAutoIndent  = 12;          { Auto Indentation }
  235.  
  236. {-Search Flags constants}
  237.  
  238.   EWSearchbBackward  =  1;         { Backward search }
  239.   EWSearchbBlock     =  2;         { Search within marked block only }
  240.   EWSearchbCase      =  3;         { Case sensitive search }
  241.   EWSearchbKeepCase  =  4;         { Keep case type when replacing string }
  242.   EWSearchbGlobal    =  5;         { Global Search }
  243.   EWSearchbGothru    =  6;         { Replace without prompting }
  244.   EWSearchbRegular   =  7;         { Boolean search flag }
  245.   EWSearchbWord      =  8;         { Word-only search }
  246.   EWSearchbAcross    =  9;         { Search across edited files }
  247.  
  248. {-Compile command codes}
  249.  
  250.   EWCompileCommand   =  0;
  251.   EWMakeCommand      =  1;
  252.   EWBuildCommand     =  2;
  253.   EWDebugCommand     =  3;
  254.   EWExecuteCommand   =  4;
  255.  
  256. {-Macro string codes}
  257.  
  258.   EWMacro_Time       =  0;
  259.   EWMacro_Date       =  1;
  260.   EWMacro_FileName   =  2;
  261.  
  262. {-Position codes}
  263.  
  264.   EWPosition_Top     = 0;
  265.   EWPosition_Middle  = 1;
  266.   EWPosition_Bottom  = 2;
  267.  
  268. {-Selection modes}
  269.  
  270.   EWSelection_None   = 0;
  271.   EWSelection_Line   = 1;
  272.   EWSelection_Stream = 2;
  273.   EWSelection_Block  = 3;
  274.  
  275. {-Write modes for EWWriteBlock}
  276.  
  277.   EWWrite_ReWrite    = 1;
  278.   EWWrite_Append     = 2;
  279.  
  280. type
  281.  
  282.   PSelStruct = ^TSelStruct;
  283.   TSelStruct = record
  284.     SelType       : word;
  285.     FirstSelLine,
  286.     LastSelLine,
  287.     FirstSelCol,
  288.     LastSelCol,
  289.     StartSelIndex,
  290.     EndSelIndex   : integer;
  291.   end;
  292.  
  293.   TEnumEditorsProc = procedure(EditorId : longint; Name : PChar);
  294.   TEnumClonesProc  = procedure(CloneHandle : THandle; CloneId : byte);
  295.   TFuncEntryHook   = function(command : word) : integer;
  296.   TFuncExitHook    = function(command : word; pRetcode : PInteger) : integer;
  297.   TKbdEntryHook    = function(Msg : TMsg) : integer;
  298.   TPaintEntryHook  = function(DC : HDC; PaintInfo : PPaintStruct; SelInfo : PSelStruct; hWindow : word) : integer;
  299.   TLoadExitHook    = function(EditorId : longint) : integer;
  300.   TNotifyHook      = function(eventcode : word; wParam : word; lParam : longint) : integer;
  301.   TExecFunc        = function(RoutineId : word) : integer;
  302.